package com.usian.behavior.service;

import com.usian.behavior.entity.ApLikesBehavior;
import com.baomidou.mybatisplus.extension.service.IService;
import com.usian.model.behavior.dtos.LikesBehaviorDto;

/**
 * <p>
 * APP点赞行为表 服务类
 * </p>
 *
 * @author usian
 * @since 2022-10-14
 */
public interface IApLikesBehaviorService extends IService<ApLikesBehavior> {

    /**
     * 记录点赞行为
     * @param dto
     * @return
     */
    void like(LikesBehaviorDto dto);

    /**
     * 查询文章是否被点赞
     * @param userId
     * @param equipmentId
     * @param articleId
     * @param likeType
     * @return
     */
    ApLikesBehavior findLikeByArticleId(Integer userId, String equipmentId, Long articleId, Integer likeType);
}
